<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta name="robots" content="noindex,nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<META HTTP-EQUIV="pragma" CONTENT="no-cache"> 
<META HTTP-EQUIV="Cache-Control" CONTENT="no-store, must-revalidate"> 
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT"> 
<META HTTP-EQUIV="expires" CONTENT="0"> 
<link rel="stylesheet" type="text/css" href="layui/css/layui.css" />
<link rel="stylesheet" type="text/css" href="css/x.css"/>
<link rel="stylesheet" href="css/font.css">
<title>视频管理</title>
<script src="js/common.js" type="text/javascript"></script>
<script src="js/main.js" type="text/javascript"></script>
<script src="layui/layui.js" type="text/javascript"></script>
<script type="text/javascript"> 
// 图片预览
function showpic(event,imgsrc){	
	var left = event.clientX+document.documentElement.scrollLeft+20;
	var top = event.clientY+document.documentElement.scrollTop+20;
	$("preview").style.display="";
	$("preview").style.left=left+"px";
	$("preview").style.top=top+"px";
	$("pic_a1").setAttribute('src',imgsrc);
}
// 取消预览
function hiddenpic(){
	$("preview").style.display="none";
}
</script>
</head>
<body>
<!--当前导航-->
<?php
    require_once(dirname(__FILE__)."/../../data/config.plus.inc.php"); 
    $numPerPage=$PLUS["Other"]["numPerPage"];
    $v_state=isset($v_state) ? $v_state : '';
    $v_commend=isset($v_commend) ? $v_commend : '';
    $v_recycled=isset($v_recycled) ? $v_recycled : '';
    $repeat=isset($repeat) ? $repeat : '';
    if(empty($order)) $order="v_addtime";
    $order=trim(str_replace("desc","",$order));
	  if($order =='id'){$order="v_id";}
    $orderStr= " order by d.$order desc";
    $page = isset($page) ? intval($page) : 1;
    if($page==0) $page=1;
    $whereStr="  ";
    if ($action=="nullpic") $whereStr.=" and d.v_pic=''";
	if ($action=="errpic") $whereStr.=" and d.v_pic like '%err'";
    if ($v_state=="ok") $whereStr.=" and d.v_state>0";
    if ($v_commend=="ok") $whereStr.=" and d.v_commend>0";
    if ($v_recycled=="ok") $whereStr.=" and d.v_recycled=1";
	if ($v_isunion=="ok") $whereStr.=" and d.v_isunion=1";
	if ($v_ispsd=="ok") $whereStr.=" and d.v_psd != ''";
	if ($v_ismoney=="ok") $whereStr.=" and d.v_money !=0";
	if (!empty($jqtype)) $whereStr.=" and d.v_jq like '%$jqtype%'";
	if (!empty($area)) $whereStr.=" and d.v_publisharea = '$area'";
	if (!empty($year)) $whereStr.=" and d.v_publishyear = '$year'";
	if (!empty($yuyan)) $whereStr.=" and d.v_lang = '$yuyan'";
	if (!empty($letter)) $whereStr.=" and d.v_letter = '$letter'";
	if (!empty($commend)) $whereStr.=" and d.v_commend = '$commend'";
	if (!empty($ver)) $whereStr.=" and d.v_ver = '$ver'";
    if ($repeat=="ok") {
        if($allrepeat=="ok")
        {
       		$dsql->SetQuery("select v_name from sea_data where v_recycled=0 group by v_name having count(*)>1");
            $dsql->Execute('video_have');
            $repeatsql="";
            while($rowh=$dsql->GetObject('video_have'))
            {
                if(!empty($rowh->v_name))
                {
                    $repeatsql.="'".$rowh->v_name."',";
                }
            }
            if(empty($repeatsql))
            {
                showMsg('恭喜，无重复数据','admin_datarelate.php?action=repeat');
                exit();
            }else
            {
            	$whereStr .= " and d.v_name in (".rtrim($repeatsql,',').")";
            }
            
        }else
        {
            $dsql->SetQuery("select substring(v_name,1,$rlen) as v_name from sea_data where v_recycled=0 group by substring(v_name,1,$rlen) having count(*)>1");
            $dsql->Execute('video_have');
            $repeatsql="";
            while($rowh=$dsql->GetObject('video_have'))
            {
                if(!empty($rowh->v_name))
                {
                    $repeatsql.="or d.v_name like '$rowh->v_name%' ";
                }
            }
            $whereStr.=rtrim(" and 1=2 or ".ltrim($repeatsql,"or"),"or ");
        }
    }
    if ($empty=="p") {
        $whereStr.=" and p.body =''";
    }
	if ($empty=="d") {
        $whereStr.=" and p.body1 =''";
    }
	if ($empty=="pd") {
        $whereStr.=" and p.body ='' and p.body1 =''";
    }
	if ($empty=="from") {$whereStr.=" and p.body  like '$$%' ";}
    if (!empty($type)) $whereStr.=" and d.tid in (".getTypeId($type).")";
    if (!empty($etype)) $whereStr.=" and d.tid in (".getTypeId($etype).")";
    if (!empty($topic)) $whereStr.=" and d.v_topic =".$topic;
    if (!empty($keyword)) $whereStr.=" and d.v_name like '%".$keyword."%' or d.v_actor like '%".$keyword."%' or d.v_nickname like '%".$keyword."%' or d.v_director like '%".$keyword."%' ";
    if (!empty($playfrom)) $whereStr.=" and p.body like '%".$playfrom."$$%' ";
	if (!empty($downfrom)) $whereStr.=" and p.body1 like '%".$downfrom."$$%' ";
    if (!empty($etype)) $whereStr.=" or FIND_IN_SET('".getTypeId($etype)."',d.v_extratype)<>0";
    $whereorder = str_replace("where order","order",str_replace("where and","and",$whereStr.$orderStr));
	//计算有多少条数据
    $csqlStr="select count(*) as dd from `sea_data` d left join `sea_playdata` p on p.v_id=d.v_id where d.v_recycled=0 ".$whereorder;
    if ($v_recycled=="ok")$csqlStr="select count(*) as dd from `sea_data` d left join `sea_playdata` p on p.v_id=d.v_id where d.v_recycled=1 ".$whereorder;
    $row = $dsql->GetOne($csqlStr);
    if(is_array($row)){
        $TotalResult = $row['dd'];
    }else{
        $TotalResult = 0;
    }
    $TotalPage = ceil($TotalResult/$numPerPage);
    if ($page>$TotalPage) $page=$TotalPage;
    $limitstart = ($page-1) * $numPerPage;
    if($limitstart<0) $limitstart=0;
    
    $sqlStr="select  d.v_pic,d.v_isunion,d.v_id,d.v_name,d.v_hit,0,d.v_state,d.tid,d.v_topic,d.v_addtime,d.v_jq,d.v_enname,d.v_commend,p.body as v_playdata,p.body1 as v_playdata1,t.tname from sea_data d left join `sea_type` t on t.tid=d.tid left join `sea_playdata` p on p.v_id=d.v_id where d.v_recycled=0 ".$whereorder." limit $limitstart,$numPerPage";
  
    if ($v_recycled=="ok") $sqlStr="select d.v_pic,d.v_isunion,d.v_id,d.v_name,d.v_enname,d.v_hit,0,d.v_state,d.tid,d.v_topic,d.v_addtime,d.v_jq,d.v_commend,p.body as v_playdata,p.body1 as v_playdata1,t.tname from sea_data d left join `sea_type` t on t.tid=d.tid left join `sea_playdata` p on p.v_id=d.v_id where 1=1 ".$whereorder." limit $limitstart,$numPerPage";
	$jumpurl = "&action=$action&v_recycled=$v_recycled&v_isunion=$v_isunion&v_ismoney=$v_ismoney&v_ispsd=$v_ispsd&order=$order&type=$type&etype=$etype&keyword=$keyword&v_state=$v_state&v_commend=$v_commend&repeat=$repeat&allrepeat=$allrepeat&topic=$topic&playfrom=$playfrom&downfrom=$downfrom&empty=$empty&rlen=$rlen&jqtype=$jqtype&area=$area&year=$year&yuyan=$yuyan&letter=$letter&commend=$commend&ver=$ver";

?>
<div class="layui-fluid">
  <div class="r_content pd15">
    <div style="overflow-x: auto">
      <table class="layui-table" style="min-width:1170px;">
        
          <div id="preview" style="z-index:188886;position:absolute;display:none;width:220;height:165;" class="showpic"> <img name="pic_a1" id="pic_a1" width="220"></div>
          <form action="?v_recycled=<?php echo $v_recycled ?>&v_isunion=<?php echo $v_isunion ?>&v_ismoney=<?php echo $v_ismoney ?>&v_ispsd=<?php echo $v_ispsd ?>&jqtype=<?php echo $jqtype; ?>" method="post" >
            
			<tr><th colspan="15">数据管理&nbsp;&nbsp;<input  name="keyword" type="text" id="keyword" size="20">
              
              <select name="type" id="type"  >
                <option value="">全部分类</option>
                <?php makeTypeOption(0,"&nbsp;|&nbsp;",0)?>
              </select>
			  <input type="submit" name="selectBtn" value="查询或重置" class="btn"  />
              &nbsp;
              <select  onchange="self.location.href='?v_recycled=<?php echo $v_recycled ?>&v_isunion=<?php echo $v_isunion ?>&v_ismoney=<?php echo $v_ismoney ?>&v_ispsd=<?php echo $v_ispsd ?>&order=<?php echo $order;?>&keyword=<?php echo $keyword;?>&v_state=<?php echo $v_state;?>&v_commend=<?php echo $v_commend;?>&repeat=<?php echo $repeat;?>&topic=<?php echo $topic;?>&playfrom=<?php echo $playfrom;?>&downfrom=<?php echo $downfrom;?>&empty=<?php echo $empty;?>&rlen=<?php echo $rlen;?>&jqtype=<?php echo $jqtype;  ?>&area=<?php echo $area;  ?>&year=<?php echo $year;  ?>&yuyan=<?php echo $yuyan;  ?>&letter=<?php echo $letter;  ?>&commend=<?php echo $commend;  ?>&ver=<?php echo $ver;  ?>&type='+this.options[this.selectedIndex].value">
                <option value="">按分类</option>
                <?php makeTypeOption(0,"&nbsp;|&nbsp;",0)?>
              </select> 
			  <select id='area' name='area' style="width:80px" onChange="self.location.href='?v_recycled=<?php echo $v_recycled ?>&v_isunion=<?php echo $v_isunion ?>&v_ismoney=<?php echo $v_ismoney ?>&v_ispsd=<?php echo $v_ispsd ?>&order=<?php echo $order;?>&type=<?php echo $type;?>&keyword=<?php echo $keyword;?>&v_state=<?php echo $v_state;?>&v_commend=<?php echo $v_commend;?>&repeat=<?php echo $repeat;?>&topic=<?php echo $topic;?>&playfrom=<?php echo $playfrom;?>&downfrom=<?php echo $downfrom;?>&empty=<?php echo $empty;?>&rlen=<?php echo $rlen;?>&jqtype=<?php echo $jqtype;  ?>&year=<?php echo $year;  ?>&yuyan=<?php echo $yuyan;  ?>&letter=<?php echo $letter;  ?>&commend=<?php echo $commend;  ?>&ver=<?php echo $ver;  ?>&area='+this.options[this.selectedIndex].value">
                <option value=''>按年级</option>
                <?php echo zzget('area');?>
              </select> 
			  <select id='year' name='year' style="width:80px" onChange="self.location.href='?v_recycled=<?php echo $v_recycled ?>&v_isunion=<?php echo $v_isunion ?>&v_ismoney=<?php echo $v_ismoney ?>&v_ispsd=<?php echo $v_ispsd ?>&order=<?php echo $order;?>&type=<?php echo $type;?>&keyword=<?php echo $keyword;?>&v_state=<?php echo $v_state;?>&v_commend=<?php echo $v_commend;?>&repeat=<?php echo $repeat;?>&topic=<?php echo $topic;?>&playfrom=<?php echo $playfrom;?>&downfrom=<?php echo $downfrom;?>&empty=<?php echo $empty;?>&rlen=<?php echo $rlen;?>&jqtype=<?php echo $jqtype;  ?>&area=<?php echo $area;  ?>&yuyan=<?php echo $yuyan;  ?>&letter=<?php echo $letter;  ?>&commend=<?php echo $commend;  ?>&ver=<?php echo $ver;  ?>&year='+this.options[this.selectedIndex].value">
                <option value=''>按年代</option>
                <?php echo zzget('year');?>
              </select> 
			  <select id='yuyan' name='yuyan' style="width:80px" onChange="self.location.href='?v_recycled=<?php echo $v_recycled ?>&v_isunion=<?php echo $v_isunion ?>&v_ismoney=<?php echo $v_ismoney ?>&v_ispsd=<?php echo $v_ispsd ?>&order=<?php echo $order;?>&type=<?php echo $type;?>&keyword=<?php echo $keyword;?>&v_state=<?php echo $v_state;?>&v_commend=<?php echo $v_commend;?>&repeat=<?php echo $repeat;?>&topic=<?php echo $topic;?>&playfrom=<?php echo $playfrom;?>&downfrom=<?php echo $downfrom;?>&empty=<?php echo $empty;?>&rlen=<?php echo $rlen;?>&jqtype=<?php echo $jqtype;  ?>&area=<?php echo $area;  ?>&year=<?php echo $year;  ?>&letter=<?php echo $letter;  ?>&commend=<?php echo $commend;  ?>&ver=<?php echo $ver;  ?>&yuyan='+this.options[this.selectedIndex].value">
                <option value=''>按学期</option>
                <?php echo zzget('yuyan');?>
              </select> 
			  <select id='ver' name='ver' style="width:80px" onChange="self.location.href='?v_recycled=<?php echo $v_recycled ?>&v_isunion=<?php echo $v_isunion ?>&v_ismoney=<?php echo $v_ismoney ?>&v_ispsd=<?php echo $v_ispsd ?>&order=<?php echo $order;?>&type=<?php echo $type;?>&keyword=<?php echo $keyword;?>&v_state=<?php echo $v_state;?>&v_commend=<?php echo $v_commend;?>&repeat=<?php echo $repeat;?>&topic=<?php echo $topic;?>&playfrom=<?php echo $playfrom;?>&downfrom=<?php echo $downfrom;?>&empty=<?php echo $empty;?>&rlen=<?php echo $rlen;?>&jqtype=<?php echo $jqtype;  ?>&area=<?php echo $area;  ?>&year=<?php echo $year;  ?>&yuyan=<?php echo $yuyan;  ?>&letter=<?php echo $letter;  ?>&commend=<?php echo $commend;  ?>&ver='+this.options[this.selectedIndex].value">
                <option value=''>按版本</option>
                <?php echo zzget('ver');?>
              </select> 
			  <select id='commend' name='commend' style="width:80px" onChange="self.location.href='?v_recycled=<?php echo $v_recycled ?>&v_isunion=<?php echo $v_isunion ?>&v_ismoney=<?php echo $v_ismoney ?>&v_ispsd=<?php echo $v_ispsd ?>&v_ispsd=<?php echo $v_ispsd ?>&order=<?php echo $order;?>&type=<?php echo $type;?>&keyword=<?php echo $keyword;?>&v_state=<?php echo $v_state;?>&v_commend=<?php echo $v_commend;?>&repeat=<?php echo $repeat;?>&topic=<?php echo $topic;?>&playfrom=<?php echo $playfrom;?>&downfrom=<?php echo $downfrom;?>&empty=<?php echo $empty;?>&rlen=<?php echo $rlen;?>&jqtype=<?php echo $jqtype;  ?>&area=<?php echo $area;  ?>&year=<?php echo $year;  ?>&yuyan=<?php echo $yuyan;  ?>&letter=<?php echo $letter;  ?>&ver=<?php echo $ver;  ?>&commend='+this.options[this.selectedIndex].value">
			    <option value=''>按星级</option>
          <option value='0'>零星</option>
				  <option value='1'>一星</option>
				  <option value='2'>二星</option>
				  <option value='3'>三星</option>
				  <option value='4'>四星</option>
				  <option value='5'>五星</option>
        </select>
			  <select id='commend' name='commend' style="width:110px" onChange="self.location.href='?v_isunion=<?php echo $v_isunion ?>&v_ismoney=<?php echo $v_ismoney ?>&v_ispsd=<?php echo $v_ispsd ?>&v_ispsd=<?php echo $v_ispsd ?>&order=<?php echo $order;?>&type=<?php echo $type;?>&keyword=<?php echo $keyword;?>&v_state=<?php echo $v_state;?>&v_commend=<?php echo $v_commend;?>&repeat=<?php echo $repeat;?>&topic=<?php echo $topic;?>&playfrom=<?php echo $playfrom;?>&downfrom=<?php echo $downfrom;?>&empty=<?php echo $empty;?>&rlen=<?php echo $rlen;?>&jqtype=<?php echo $jqtype;  ?>&area=<?php echo $area;  ?>&year=<?php echo $year;  ?>&yuyan=<?php echo $yuyan;  ?>&letter=<?php echo $letter;  ?>&ver=<?php echo $ver;  ?>&commend=<?php echo $commend; ?>&v_recycled='+this.options[this.selectedIndex].value">
			    <option value=''>按是否隐藏</option>
          <option value='1'>显示</option>
				  <option value='ok'>隐藏</option>
        </select>        
			  </th></tr>
          </form> 
        </tr>
        <?php
if($TotalResult==0){
    if(!empty($keyword)){
    echo "<tr><td colspan='10'>关键字  <font color=red>\"".$keyword."\"</font>   没有记录</td></tr>";
    }
}else{
	if(!empty($keyword)){
?>
        <tr >
          <td colspan="10">关键字 <font color=red> <?php echo $keyword;?> </font> 的记录如下</td>
        </tr>
        <?php
	}
}
?>
        <tr style="background-color: #F6F6F6;" align="center">
          <td width="6%" align="center">&nbsp;<a href="?order=v_id&page=<?php echo $page;?>&v_recycled=<?php echo $v_recycled ?>&v_isunion=<?php echo $v_isunion ?>&v_ismoney=<?php echo $v_ismoney ?>&v_ispsd=<?php echo $v_ispsd ?>&type=<?php echo $type;?>&keyword=<?php echo $keyword;?>&v_state=<?php echo $v_state;?>&v_commend=<?php echo $v_commend;?>&repeat=<?php echo $repeat;?>&topic=<?php echo $topic;?>&playfrom=<?php echo $playfrom;?>&empty=<?php echo $empty;?>&rlen=<?php echo $rlen;?>&jqtype=<?php echo $jqtype;  ?>&area=<?php echo $area;  ?>&year=<?php echo $year;  ?>&yuyan=<?php echo $yuyan;  ?>&letter=<?php echo $letter;  ?>&commend=<?php echo $commend;  ?>&ver=<?php echo $ver;  ?>">ID<img src="img/minus.gif" title="按ID排序" /></a></td>
          <td width="25%">标题</td>
          <td width="5%"><a href="?order=v_hit&type=<?php echo $type;?>&page=<?php echo $page;?>&v_state=<?php echo $v_state;?>&v_commend=<?php echo $v_commend;?>&v_recycled=<?php echo $v_recycled ?>&v_isunion=<?php echo $v_isunion ?>&v_ismoney=<?php echo $v_ismoney ?>&v_ispsd=<?php echo $v_ispsd ?>&keyword=<?php echo $keyword;?>&repeat=<?php echo $repeat;?>&topic=<?php echo $topic;?>&playfrom=<?php echo $playfrom;?>&empty=<?php echo $empty;?>&rlen=<?php echo $rlen;?>&jqtype=<?php echo $jqtype;  ?>&area=<?php echo $area;  ?>&year=<?php echo $year;  ?>&yuyan=<?php echo $yuyan;  ?>&letter=<?php echo $letter;  ?>&commend=<?php echo $commend;  ?>&ver=<?php echo $ver;  ?>">人气<img src="img/minus.gif" title="按人气排序" /></a></td>
          <td width="8%">栏目分类</td>
          <td width="10%"><a href="?order=v_commend&type=<?php echo $type;?>&page=<?php echo $page;?>&v_state=<?php echo $v_state;?>&v_commend=<?php echo $v_commend;?>&v_recycled=<?php echo $v_recycled ?>&v_isunion=<?php echo $v_isunion ?>&v_ismoney=<?php echo $v_ismoney ?>&v_ispsd=<?php echo $v_ispsd ?>&keyword=<?php echo $keyword;?>&repeat=<?php echo $repeat;?>&topic=<?php echo $topic;?>&playfrom=<?php echo $playfrom;?>&empty=<?php echo $empty;?>&rlen=<?php echo $rlen;?>&jqtype=<?php echo $jqtype;  ?>&area=<?php echo $area;  ?>&year=<?php echo $year;  ?>&yuyan=<?php echo $yuyan;  ?>&letter=<?php echo $letter;  ?>&commend=<?php echo $commend;  ?>&ver=<?php echo $ver;  ?>">推荐星级<img src="img/minus.gif" title="按推荐星级排序" /></a></td>
          <td width="10%"><a href="?order=v_addtime&type=<?php echo $type;?>&page=<?php echo $page;?>&v_state=<?php echo $v_state;?>&v_commend=<?php echo $v_commend;?>&v_recycled=<?php echo $v_recycled ?>&v_isunion=<?php echo $v_isunion ?>&v_ismoney=<?php echo $v_ismoney ?>&v_ispsd=<?php echo $v_ispsd ?>&keyword=<?php echo $keyword;?>&repeat=<?php echo $repeat;?>&topic=<?php echo $topic;?>&playfrom=<?php echo $playfrom;?>&empty=<?php echo $empty;?>&rlen=<?php echo $rlen;?>&jqtype=<?php echo $jqtype;  ?>&area=<?php echo $area;  ?>&year=<?php echo $year;  ?>&yuyan=<?php echo $yuyan;  ?>&letter=<?php echo $letter;  ?>&commend=<?php echo $commend;  ?>&ver=<?php echo $ver;  ?>">时间<img src="img/minus.gif" title="按时间排序" /></a></td>
          <?php if($cfg_runmode=='0'){?>
          <td width="30">生成</td>
          <?php }?>
          <td width="10%" align="center">操作</td>
        </tr>
        <form method="post" name="videolistform">
 <?php
  $dsql->SetQuery($sqlStr);
  $dsql->Execute('video_list');
  while($row=$dsql->GetObject('video_list'))
  {
    $v_id=$row->v_id;
    $contentUrl=getContentLink($row->tid,$v_id,"",date('Y-n',$row->v_addtime),$row->v_enname);
    $fromstr=getFromStr($row->v_playdata)." ".getFromStr($row->v_playdata1);
    ?>
        <tr align="center">
          <td><input type="checkbox" value="<?php echo $v_id;?>" name="e_id[]" class="checkbox" />
            <?php echo $v_id;?></td>
            <td align="left" ><a href="<?php echo $contentUrl;?>" target="_blank" onMouseOver="showpic(event,'<?php if(strpos($row->v_pic,'uploads')===0)echo '/'.$GLOBALS['cfg_cmspath'].$row->v_pic; else echo $row->v_pic;?>');" onMouseOut="hiddenpic();"><?php echo $row->v_name;?></a>
            </td>
          <td><?php echo $row->v_hit;?></td>
          
          <td><div title="<?php if($row->tname){echo $row->tname." ".$row->v_jq;}else{echo "数据分类错误";}?>" alt="<?php if($row->tname){echo $row->tname." ".$row->v_jq;}else{echo "数据分类错误";}?>">
            <?php if($row->tname){echo $row->tname." ".$row->v_jq;}else{echo "<font color=red >数据分类错误</font>";}?>
            </div></td>
          
          <td id="star<?php echo $v_id;?>"><script>starView(<?php echo $row->v_commend;?>,<?php echo $v_id;?>,0)</script></td>
          <td><span title="<?php echo MyDate('Y-m-d H:i:s',$row->v_addtime);?>"><?php echo isCurrentDay($row->v_addtime);?></span></td>
          <?php if($cfg_runmode=='0'){?>
          <td><?php isVideoMake($v_id,$contentUrl);?></td>
          <?php }?>
          <td align="center"><a href="?action=edit&id=<?php echo $v_id;?>">编辑</a> <a href="?action=del&id=<?php echo $v_id;?>" onClick="return confirm('确定要删除吗')">删除</a> <a href="?action=<?php echo $v_recycled=='ok'?'restore':'hide' ?>&id=<?php echo $v_id;?>"><?php echo $v_recycled=='ok'?'还原':'隐藏' ?></a> </td>
        </tr>
    <?php }?>

          <tr>
            <td colspan="11"><label>全选&nbsp;&nbsp;<input type="checkbox" name="chkall" id="chkall" class="checkbox" onclick="checkAll(this.checked,'input','e_id[]')" /></label>
              &nbsp;&nbsp;<label>反选&nbsp;&nbsp;<input type="checkbox" name="chkothers" id="chkothers" class="checkbox" onclick="checkOthers('input','e_id[]')" /></label>
              &nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="<?php if($v_recycled=='ok'){?>数据还原<?php }else{ ?>批量删除 <?php } ?>" onclick="<?php if($v_recycled=='ok'){?>if(confirm('确定要还原吗')){videolistform.action='?action=restoreall';}else{return false}<?php }else{ ?>if(confirm('确定要删除吗')){videolistform.action='?action=delall';}else{return false}<?php } ?>" class="rb1"  />
              <input type="submit" value="<?php if($v_recycled=='ok'){?>永久删除<?php }else{ ?>批量生成<?php } ?>" class="rb1" onclick="<?php if($v_recycled=='ok'){?>if(confirm('确定要永久删除吗')){videolistform.action='?action=delall';}else{return false}<?php }else{ ?>videolistform.action='admin_makehtml.php?action=selected'<?php } ?>" />
              
              <select name="movetype" id="movetype"  >
                <option value="">请选择目标分类</option>
                <?php makeTypeOption(0,"&nbsp;|&nbsp;",0)?>
              </select>
              <input type="submit" value="批量移动" class="rb1" onclick="if($('movetype').value==''){alert('请选择目标分类');return false;};if(confirm('确定要批量移动数据吗')){videolistform.action='?action=psettype'}else{return false;}"/>
              <?php if($v_recycled!='ok'){?>
              <input type="submit"  value="删除分类数据" class="rb1" onclick="if($('movetype').value==''){alert('请选择目标分类');return false;};if(confirm('谨慎操作，数据不可恢复\n确定要删除此分类的所有数据吗')){videolistform.action='?action=deltypedata'}else{return false;}"/>
              <?php }?>
           
			</td>
          </tr>
        </form>
      </table>
      <div id="new_pages" class="layui-fluid">      
    </div>
  </div>
</div>
</body>
<script type="text/JavaScript">

	layui.use(['laypage', 'layer'], function(){
	  var laypage = layui.laypage
	  ,layer = layui.layer;
	  laypage.render({
	      elem: 'new_pages'
	      ,count: <?php echo $TotalResult;?>
		  ,limit: <?php echo $numPerPage;?>
		  ,curr:<?php echo $page;?>
	      ,layout: ['count', 'prev', 'page', 'next', 'skip']
	      ,jump: function(obj,first){
			  if(!first){
          location.href='?page='+ obj.curr +'&action=<?php echo $action ?>&v_recycled=<?php echo $v_recycled ?>&v_isunion=<?php echo $v_isunion ?>&v_ismoney=<?php echo $v_ismoney ?>&v_ispsd=<?php echo $v_ispsd ?>&order=<?php echo $order;?>&type=<?php echo $type;?>&keyword=<?php echo $keyword;?>&v_state=<?php echo $v_state;?>&v_commend=<?php echo $v_commend;?>&repeat=<?php echo $repeat;?>&topic=<?php echo $topic;?>&playfrom=<?php echo $playfrom;?>&downfrom=<?php echo $downfrom;?>&empty=<?php echo $empty;?>&rlen=<?php echo $rlen;?>&jqtype=<?php echo $jqtype;  ?>&area=<?php echo $area;  ?>&year=<?php echo $year;  ?>&yuyan=<?php echo $yuyan;  ?>&letter=<?php echo $letter;  ?>&commend=<?php echo $commend;  ?>&ver=<?php echo $ver;  ?>';
			}
	      }
	    });
	  });
</script>
</html>
